from celery import shared_task
from utils.sendmsg import send_message
import logging


@shared_task
def add(x, y):
    return x + y


@shared_task
def send(mobile, code):
    try:
        return send_message(mobile, code)
    except Exception as e:
        logging.error(f"发送短信失败:{e}")
